package FirstWork;

public class ShuiXianHua {
    public static void main(String[] args) {
        for (int i=0;i<1000;i++){
            if(isShuiXianHua(i)){
                System.out.println(i);
            }
        }
    }

   public  static boolean isShuiXianHua(int n){
       int m=n;
       int sum=0;
       while (true){
           int d=m%10;
           sum+=(d*d*d);
           m/=10;
           if (m==0){
               if (sum==n){
                   return true;
               }
               return false;
           }
        }
   }
}
